<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
    <title>奖励惩罚</title>
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/weui.min.css')}}">
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/jquery-weui.css')}}">
    <link rel="stylesheet" href="/css/system/front-iconfont.css?v=2018121301">
    @if($skinid == 3)
        <link rel="stylesheet" href="{{asset('/css/system/common.css')}}">
        <link rel="stylesheet" href="/css/system/front-rewards-punish.css?v=2019013001">
    @elseif($skinid == 1)
        <link rel="stylesheet" href="/css/theme-blue/system/common.css">
        <link rel="stylesheet" href="/css/theme-blue/system/front-rewards-punish.css">
    @elseif($skinid ==2)
        <link rel="stylesheet" href="/css/theme-pink/system/iconfont-pink.css">
        <link rel="stylesheet" href="/css/theme-pink/system/common.css">
        <link rel="stylesheet" href="/css/theme-pink/system/front-rewards-punish.css">
    @endif
</head>
<body ontouchstart>
<div class="index-review">
    <div class="header-bk">
        <div class="con-head">
            <img src="{{ !empty($user->user_logo) ?asset($user->user_logo).'?v='.time():'/img/list-demo1.png'}}"><span class="user-name">{{$user->qw_name}}</span>
        </div>
        <div class="list-content">
            <p><span class="span-cir"></span><span class="span-num">{{$year_param}}年</span></p>
            <p><span class="span-cir"></span>奖励<span class="span-num">+{{$rescore}}</span></p>
            <p><span class="span-circle"></span>惩罚<span class="span-num">-{{$puscore}}</span></p>
        </div>
    </div>
    <div class="weui-tab">
      <div class="weui-navbar">
        <a class="weui-navbar__item weui-bar__item--on" href="#tab1">
          <i class="icon icon-a iconfont icon-xiaolian"></i>
          <p>奖励</p>
        </a>
        <a class="weui-navbar__item" href="#tab2">
          <i class="icon icon-a iconfont icon-kulian"></i>
          <p>惩罚</p>
        </a>
      </div>
      <div class="weui-tab__bd">
        <div id="tab1" class="tab1 weui-tab__bd-item weui-tab__bd-item--active">
            {{--<div class="rewards-section">
                <div class="header-sec">
                    <h3>奖励</h3>
                    <span class="score-span">12</span>
                    <p class="icon-level">中级</p>
                </div>
                <div class="middle-sec">
                    <p class="text-left">发起人：dede</p>
                    <p class="text-middle">cefffdvgfdbvd</p>
                </div>
            </div>--}}
            @foreach($reward as $r)
                <div class="rewards-section">
                    <div class="header-sec">
                        <h3>{{$r->created_at->format('Ymd')}}奖励</h3>
                        <span class="score-span">+{{isset($rdetail[$r->set_detail_id])?$rdetail[$r->set_detail_id]:0}}</span>
                        <p class="icon-level">{{$r->grade}}</p>
                    </div>
                    <div class="middle-sec">
                        <p class="text-left">发起人：{{getUserName($r->from_user_id)}}</p>
                        <p class="text-middle">{{$r->reason}}</p>
                    </div>
                </div>
            @endforeach
        </div>
        <div id="tab2" class="tab2 weui-tab__bd-item">
            @foreach($punish as $p)
                <div class="rewards-section">
                    <div class="header-sec">
                        <h3>{{$p->created_at->format('Ymd')}}惩罚</h3>
                        <span class="score-span">-{{isset($pdetail[$p->set_detail_id])?$pdetail[$p->set_detail_id]:0}}</span>
                        <p class="icon-level">{{$p->grade}}</p>
                    </div>
                    <div class="middle-sec">
                        <p class="text-left">发起人：{{getUserName($p->from_user_id)}}</p>
                        <p class="text-middle">{{$p->reason}}</p>
                    </div>
                </div>
            @endforeach
        </div>
      </div>
    </div>
</div>
@include('frontuser.caidan')
<script src="{{asset('/kaohe/js/jquery-2.1.4.min.js')}}"></script>
<script src="{{asset('/addons/jquery-weui-build/js/fastclick.js')}}"></script>
<script src="{{asset('/kaohe/js/echarts.min.js')}}"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="{{asset('/addons/jquery-weui-build/js/jquery-weui.min.js')}}"></script>
<script>
    $('.kaohe-item').click(function(){
        $('.front-show-hidden').toggle();
    })
    $('.set-btn').click(function () {
        $('.set-hidden').toggle();
    })
</script>
</body>
</html>